package com.cl.blog.config;

import org.apache.http.HttpHost;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestHighLevelClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author 付
 * @Date 2024-05-08 21:10
 * @Version 1.0
 * @description es 服务器配置
 * @since 1.0
 */
@Configuration
public class ElasticsearchConfig {
	@Bean
	public RestHighLevelClient restHighLevelClient() {
		RestHighLevelClient client = new RestHighLevelClient(
				RestClient.builder(
						new HttpHost("47.97.50.171", 9200, "http")));
		return client;
	}
}
